export default {
  // namespace:'global', // 全局的，默认叫 global.
  state: {
    count: 1,
  },
  reducers: {
    // 每一个 reducers 函数 , 注入 state, action 2个参数； action包括 type, payload2个属性
    setCount(state, action) {
      console.log(action);
      return { ...state, count: state.count + action.payload };
    },
  },
};
